import Vue from 'vue'
import Vuex from 'vuex'
import language from './language'
import checkInput from './checkInput'
import personalData from './personalData'
import rootData from './root'
import user from './user'
import ewsData from './ews'

Vue.use(Vuex)

const store = new Vuex.Store({
  modules: {
    language,
    checkInput,
    personalData,
    rootData,
    ewsData,
    user
  },
  state: {
    msg: 'hello vue!!!'
  },
  getters: {
    getMsg(state) {
      return state.msg
    },
    permission: state => state.user.permission
  }
})

export default store
